package org.zjf.gw.order.api.constant.dw;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class DeWuConstant {

    /**
     * 每页条数
     */
    public static final Integer PAGE_SIZE = 100;


    /**
     * 订单状态订单状态：1100:定金已支付(定金预售),
     * 1200:待支付尾款(定金预售),2000:支付成功,
     * 2003:待卖家接单(针对虚拟订单),2007:待卖家发货(针对众筹订单,众筹成功),
     * 2010:待平台收货,2015:待卖家发货(针对虚拟订单),3000:平台已收货,3010:质检通过,3020:鉴别通过,3030:待平台发货,
     * 3040:待买家收货,4000:交易成功(买家收货),7000:交易失败(未支付),7500:定金已支付，交易关闭(未支付尾款),8010:交易关闭成功
     */
    public static class OrderStatus {
        public static final Integer PAY_DEPOSIT = 1100;
        public static final Integer WAIT_PAY_BALANCE = 1200;
        public static final Integer PAY_SUCCESS = 2000;
        public static final Integer WAIT_SELLER_ACCEPT = 2003;
        public static final Integer WAIT_SELLER_SEND = 2007;
        public static final Integer WAIT_PLATFORM_RECEIVE = 2010;
        public static final Integer WAIT_SELLER_SEND_VIRTUAL = 2015;
        public static final Integer PLATFORM_RECEIVE = 3000;
        public static final Integer QUALITY_PASS = 3010;
        public static final Integer IDENTIFY_PASS = 3020;
        public static final Integer WAIT_PLATFORM_SEND = 3030;
        public static final Integer WAIT_BUYER_RECEIVE = 3040;
        public static final Integer TRADE_SUCCESS = 4000;
        public static final Integer TRADE_FAIL = 7000;
        public static final Integer PAY_DEPOSIT_TRADE_CLOSE = 7500;
        public static final Integer TRADE_CLOSE_SUCCESS = 8010;

        public static List<Integer> normalOrderList() {
            return Arrays.asList(PAY_SUCCESS,WAIT_SELLER_ACCEPT,WAIT_SELLER_SEND,
                    WAIT_PLATFORM_RECEIVE,WAIT_SELLER_SEND_VIRTUAL,PLATFORM_RECEIVE,QUALITY_PASS,IDENTIFY_PASS,WAIT_PLATFORM_SEND,WAIT_BUYER_RECEIVE,TRADE_SUCCESS);
        }
    }

    /**
     * 得物旗帜
     * 标记 1:红色 2:橙色 3:黄色 4:绿色 5:蓝色 6:紫色
     */
    public static class Tag {
        public static final String RED = "红色";
        public static final String ORANGE = "橙色";
        public static final String YELLOW = "黄色";
        public static final String GREEN = "绿色";
        public static final String BLUE = "蓝色";
        public static final String PURPLE ="蓝色";

        // 根据数值获取
        public static String getTag(Integer tag) {
            switch (tag) {
                case 1:
                    return Tag.RED;
                case 2:
                    return Tag.ORANGE;
                case 3:
                    return Tag.YELLOW;
                case 4:
                    return Tag.GREEN;
                case 5:
                    return Tag.BLUE;
                case 6:
                    return Tag.PURPLE;
                default:
                    return "无旗帜";
            }
        }
    }

    /**
     * 订单关闭类型
     * 关闭类型：0:默认(无业务含义),5:交易关闭,10:超时未支付,11:买家关闭,12:超时未发货,13:质检未通过,14:鉴别未通过,15:平台取消,16:补单超时,17:补单不同意,
     * 18:退货关闭,19:申请换货,20:退货关闭, 需要退卖家,21:盲盒超时未取回,22:退货中
     */
    public static class CloseType {
        public static final Integer DEFAULT = 0;
        public static final Integer TRADE_CLOSE = 5;
        public static final Integer TIMEOUT_NO_PAY = 10;
        public static final Integer BUYER_CLOSE = 11;
        public static final Integer TIMEOUT_NO_SEND = 12;
        public static final Integer QUALITY_NO_PASS = 13;
        public static final Integer IDENTIFY_NO_PASS = 14;
        public static final Integer PLATFORM_CANCEL = 15;
        public static final Integer SUPPLEMENT_TIMEOUT = 16;
        public static final Integer SUPPLEMENT_DISAGREE = 17;
        public static final Integer RETURN_CLOSE = 18;
        public static final Integer APPLY_EXCHANGE = 19;
        public static final Integer RETURN_CLOSE_SELLER = 20;
        public static final Integer BLIND_BOX_TIMEOUT = 21;
        public static final Integer RETURNING = 22;

    }


}
